<?php

/**
 * This is the model metadata class for table "account_profile".
 */
class AccountProfileMetadata extends CARMDC
{
	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'account_profile';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('gender', 'numerical', 'integerOnly'=>true),
			array('nickname, position, dept', 'length', 'max'=>20),
			array('realname', 'length', 'max'=>50),
			array('email, address, website', 'length', 'max'=>255),
			array('tel, fax, mobile', 'length', 'max'=>15),
			array('zipcode', 'length', 'max'=>6),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('id, nickname, realname, email, gender, position, dept, tel, fax, mobile, address, zipcode, website', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'id' => 'ID',
			'nickname' => '昵称',
			'realname' => '真实姓名',
			'email' => '邮箱',
			'gender' => '性别',
			'position' => '职务',
			'dept' => '所在部门',
			'tel' => '常用固定电话',
			'fax' => '传真',
			'mobile' => '手机',
			'address' => '常用通讯地址',
			'zipcode' => '邮编',
			'website' => '网址',
		);
	}
}